Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Handling Keyboard Focus /


ClearKeyboardFocus

NEW WITH THE APPEARANCE MANAGER

Clears the keyboard focus for the currently focused control in the specified window.

pascal OSErr ClearKeyboardFocus (WindowPtr inWindow);
inWindow
On input, a pointer to the window in which you wish to clear keyboard focus.
function result
A result code; see "Result Codes". The result code errNoRootControl indicates that keyboard focus is unavailable because the window does not have an embedding hierarchy established.
DISCUSSION
When the ClearKeyboardFocus function is called, the Control Manager calls your control definition function and passes kControlMsgFocus in its message parameter and kControlFocusNoPart in its param parameter. See "Handling Keyboard Focus" for a discussion of possible responses to this message.

SEE ALSO
"Handling Keyboard Focus".

"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998